package com.ruoyi.transaction.domain.DTO;

import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;
// 用于返回商品的详细信息，商品所包含的规格，及其规格值，三层嵌套
public class SpuSpecDTO extends BaseEntity {



    private Long id;

    /** 所属分类ID（关联 category） */

    private Long categoryId;

    /** 商品名称，如：伊利纯牛奶 */

    private String name;

    /** 品牌名称，如：伊利、金龙鱼 */

    private String brandName;

    /** 商品单位，如瓶、袋、箱 */

    private String unit;

    /** 商品描述 */

    private String description;

    /** 商品图片地址（多张图使用逗号分隔） */

    private String imageUrls;

    /** 条形码（部分平台用于识别） */

    private String barcode;

    /** 是否上架（0-下架，1-上架） */

    private String isActive;

    /** 删除标志（0-未删除，1-已删除） */
    private String delFlag;

    private List<SpecDTO> specDTOList;

    public SpuSpecDTO() {
    }

    public SpuSpecDTO(Long id, Long categoryId, String name, String brandName, String unit, String description, String imageUrls, String barcode, String isActive, String delFlag, List<SpecDTO> specDTOList) {
        this.id = id;
        this.categoryId = categoryId;
        this.name = name;
        this.brandName = brandName;
        this.unit = unit;
        this.description = description;
        this.imageUrls = imageUrls;
        this.barcode = barcode;
        this.isActive = isActive;
        this.delFlag = delFlag;
        this.specDTOList = specDTOList;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImageUrls() {
        return imageUrls;
    }

    public void setImageUrls(String imageUrls) {
        this.imageUrls = imageUrls;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getIsActive() {
        return isActive;
    }

    public void setIsActive(String isActive) {
        this.isActive = isActive;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public List<SpecDTO> getSpecDTOList() {
        return specDTOList;
    }

    public void setSpecDTOList(List<SpecDTO> specDTOList) {
        this.specDTOList = specDTOList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("categoryId", getCategoryId())
                .append("name", getName())
                .append("brandName", getBrandName())
                .append("unit", getUnit())
                .append("description", getDescription())
                .append("imageUrls", getImageUrls())
                .append("barcode", getBarcode())
                .append("isActive", getIsActive())
                .append("delFlag", getDelFlag())
                .append("specDTOList", getSpecDTOList())
                .toString();
    }

}
